﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="SiteColumnFeatureRecipe"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
 <Caption>Add Site Column Feature</Caption>
  <HostData>
    <Icon File="spalm.ico" />
    <CommandBar Menu="SPALMListAndDoc"/>
  </HostData>
    <Arguments>
      <Argument Name="SolutionDefaultNameSpace">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultNamespaceProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="SolutionAssemblyName">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.AssemblyProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="TargetFolder">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="12\TEMPLATE\FEATURES\$(FeatureName)" />
      </Argument>
      <Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library" />
      </Argument>


      <Argument Name="TargetFeatureFile">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="feature.xml">
        </ValueProvider>
      </Argument>
      <Argument Name="FeatureID">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="FeatureName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="FeatureName" />
      </Argument>
      <Argument Name="FeatureTitle">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Feature Title" />
      </Argument>
      <Argument Name="FeatureDescription" Required="false">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Feature Description" />
      </Argument>
      <Argument Name="FeatureScope">
        <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.ScopeConverterSiteColumn, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Site" />
      </Argument>
      <Argument Name="FeatureHidden" Type="System.Boolean" />
      <Argument Name="FeatureVersion" Required="true">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="1.0.0.0" />
      </Argument>
      <Argument Name="FeatureCreateReceiver" Type="System.Boolean" />
      <Argument Name="FeatureReceiverClass">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="$(FeatureName)FeatureReceiver" >
          <MonitorArgument Name="FeatureName"/>
        </ValueProvider>
      </Argument>
      <Argument Name="FeatureCodeFolder">
        <ValueProvider Stage="OnBeforeActions" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="CustomCode\$(FeatureName)" />
      </Argument>
      <Argument Name="FeatureReceiverFileName">
        <ValueProvider Stage="OnBeforeActions" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="$(FeatureReceiverClass).cs" />
      </Argument>
      <Argument Name="FeatureActivationDependencies" Required="false" Type="SMC.SPALM.Types.FeatureActivationDependency[], SteriaMummert.SharePoint.SoftwareFactoryLite" >
        <ValueProvider ObjectType="SMC.SPALM.Types.FeatureActivationDependency" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultCollectionProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>
      <Argument Name="FeatureFiles" Required="false">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="" />
      </Argument>


      <Argument Name="SiteColumnID">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="SiteColumnName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnGroup">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Custom Columns" />
      </Argument>      
      <Argument Name="SiteColumnStaticName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnType">
        <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.SiteColumnTypeConverter, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Text" />
      </Argument>
      <Argument Name="SiteColumnColName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnDisplayName">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Col Name" />
      </Argument>
      <Argument Name="SiteColumnReadOnly" Type="System.Boolean" />
      <Argument Name="SiteColumnRowOrdinal" Type="System.Int32" >
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="0" />
      </Argument>

    </Arguments>
    <GatheringServiceData>
      <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
        <Pages>
          <Page Height="500">
            <Title>Feature settings</Title>
            <Fields>
              <Field ValueName="FeatureID" Label="Feature ID" />
              <Field ValueName="FeatureName" Label="Name" />
              <Field ValueName="FeatureTitle" Label="Title" />
              <Field ValueName="FeatureDescription" Label="Description" />
              <Field ValueName="FeatureScope" Label="Scope" />
              <Field ValueName="FeatureHidden" Label="Hidden"></Field>
              <Field ValueName="FeatureVersion" Label="Version"></Field>
              <Field ValueName="FeatureCreateReceiver" Label="Create Feature Receiver" />
              <Field ValueName="FeatureActivationDependencies" Label="Activation Dependencies" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.CustomArrayEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
            </Fields>
          </Page>
          <Page Height="500">
            <Title>Site Column</Title>
            <Fields>
              <Field ValueName="SiteColumnID" Label="ID" />
              <Field ValueName="SiteColumnName" Label="Name" />
              <Field ValueName="SiteColumnDisplayName" Label="Display Name" />
              <Field ValueName="SiteColumnType" Label="Type" />
              <Field ValueName="SiteColumnGroup" Label="Group" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.SharePointConfigurationSiteColumnGroupEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="SiteColumnStaticName" Label="Static Name" />
              <Field ValueName="SiteColumnColName" Label="Column Name" />
              <Field ValueName="SiteColumnRowOrdinal" Label="Row Ordinal" />
              <Field ValueName="SiteColumnReadOnly" Label="Read Only" />
            </Fields>
          </Page>
        </Pages>
      </Wizard>
    </GatheringServiceData>
    <Actions CoordinatorServiceType="Microsoft.Practices.RecipeFramework.Extensions.Coordinators.ConditionalCoordinator, Microsoft.Practices.RecipeFramework.Extensions">

      <Action Name="GenerateFeature" Template="Text\feature.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="FeatureTitle" RecipeArgument="FeatureTitle" />
        <Input Name="FeatureDescription" RecipeArgument="FeatureDescription" />
        <Input Name="FeatureID" RecipeArgument="FeatureID" />
        <Input Name="FeatureHidden" RecipeArgument="FeatureHidden" />
        <Input Name="FeatureVersion" RecipeArgument="FeatureVersion" />
        <Input Name="FeatureScope" RecipeArgument="FeatureScope" />
        <Input Name="FeatureCreateReceiver" RecipeArgument="FeatureCreateReceiver" />
        <Input Name="FeatureCreateReceiverAssembly" RecipeArgument="SolutionAssemblyName" />
        <Input Name="FeatureReceiverNamespace" RecipeArgument="SolutionDefaultNameSpace" />
        <Input Name="FeatureCreateReceiverClass" RecipeArgument="FeatureReceiverClass" />
        <Input Name="FeatureActivationDependencies" RecipeArgument="FeatureActivationDependencies" />
        <Input Name="FeatureFiles" RecipeArgument="FeatureFiles" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddFeature" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="false">
        <Input Name="Content" ActionOutput="GenerateFeature.Content" />
        <Input Name="TargetFileName" RecipeArgument="TargetFeatureFile" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="TargetFolder" />
      </Action>

      <Action Name="GenerateFeatureReceiver" Condition="$(FeatureCreateReceiver)" Template="Text\FeatureReceiver.cs.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="FeatureReceiverClass" RecipeArgument="FeatureReceiverClass" />
        <Input Name="FeatureReceiverNamespace" RecipeArgument="SolutionDefaultNameSpace" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddFeatureReceiver" Condition="$(FeatureCreateReceiver)" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="false">
        <Input Name="Content" ActionOutput="GenerateFeatureReceiver.Content" />
        <Input Name="TargetFileName" RecipeArgument="FeatureReceiverFileName" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="FeatureCodeFolder" />
      </Action>      

      <Action Name="GenerateElements" Template="Text\SiteColumns\elements.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="SiteColumnID" RecipeArgument="SiteColumnID" />
        <Input Name="SiteColumnName" RecipeArgument="SiteColumnName" />
        <Input Name="SiteColumnGroup" RecipeArgument="SiteColumnGroup" />
        <Input Name="SiteColumnStaticName" RecipeArgument="SiteColumnStaticName" />
        <Input Name="SiteColumnType" RecipeArgument="SiteColumnType" />
        <Input Name="SiteColumnDisplayName" RecipeArgument="SiteColumnDisplayName" />
        <Input Name="SiteColumnReadOnly" RecipeArgument="SiteColumnReadOnly" />
        <Input Name="SiteColumnColName" RecipeArgument="SiteColumnColName" />
        <Input Name="SiteColumnRowOrdinal" RecipeArgument="SiteColumnRowOrdinal" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddElements" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="true" TargetFileName="elements.xml">
        <Input Name="Content" ActionOutput="GenerateElements.Content" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="TargetFolder" />
      </Action>
  </Actions>
</Recipe>